wxNotebook
Table of Contents

function get_current_page ( atom book )


This returns the current selected page of a wxNotebook. The index is 0 based, so the first page will be 0, instead of 1. This class represents a notebook control, which manages multiple windows with associated tabs. To use the class, create a wxNotebook object and call add_page, passing a window to be used as the page. Creation parameters: Note that sometimes you can reduce flicker by passing the wxCLIP_CHILDREN window style.

  • proc add_page( atom book, atom page, sequence text, integer select, atom image )   
  • proc delete_all_pages ( atom book )   
  • func get_next_page ( atom book, integer show )   
  • func get_page_count ( atom book )   
  • proc get_page_image ( atom book, integer page )   
  • proc insert_page ( integer position, atom book, atom page, sequence text, integer select, atom image )   
  • proc notebook_imagelist( atom book, atom ilist )   
  • proc remove_page ( atom book, integer page )   
  • proc set_padding ( atom book, sequence size )   
  • proc set_page_image ( atom book, integer page, atom image )   
  • proc set_page_selection ( atom book, integer page )   
  • proc set_page_text( atom book, integer page, sequence text )   
  • proc set_tab_size ( atom book, sequence size )   
  • proc show_page( atom book, integer page )     
     
    Parent Topics:
  • Classes
  • Controls

    wxNotebook
    Table of Contents

    [proc]
    add_page
    ( atom book, atom page, sequence text, integer select, atom image )

    Category: wxNotebook

    Adds the wxWindow page to the notebook, with text on the its tab. select indicates whether the page should be selected, and image is the image index into an imagelist.

    See Also: delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    delete_all_pages
    ( atom book )

    Category: wxNotebook

    This deletes all pages in a wxNotebook.

    See Also: add_page, get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [func]
    get_next_page
    ( atom book, integer show )

    Category: wxNotebook

    This returns the next page in the book if show is 1, or shows the previous page if show is 0. If previous is chosen on the first page, the last page will be returned, and vice versa. Also, keep in mind of the wxNotebook's 0-based index.

    See Also: add_page, delete_all_pages , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [func]
    get_page_count
    ( atom book )

    Category: wxNotebook

    This returns the number of pages in a wxNotebook.

    See Also: add_page, delete_all_pages , get_next_page , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    get_page_image
    ( atom book, integer page )

    Category: wxNotebook

    This returns the number of the sequence that the page gets it's image from if an imagelist is set. If it gets the image from the second pointer in a sequence, it will return a 1. Keep in mind that the wxNotebook works from a 0-based index as well.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    insert_page
    ( integer position, atom book, atom page, sequence text, integer select, atom image )

    Category: wxNotebook

    Sets the selected page to the wxNotebook at a certain position, rather than adding it to the end. The sequence text will appear on it's tab, select can be 1 to make the wxNotebook focus on the selected page or 0 to continue working with the same page. Image will be a pointer to an image if an imagelist exists, or 0 for no image. This works with a 0-based index, so position should be 0 instead of 1 for the first page.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    notebook_imagelist
    ( atom book, atom ilist )

    Category: wxNotebook

    This sets the wxImagelist to the wxNotebook, allowing the wxNotebook's children to use it's icons.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    remove_page
    ( atom book, integer page )

    Category: wxNotebook

    Removes the selected page from the wxNotebook. The index is 0 based, so the first page will be 0, instead of 1.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    set_padding
    ( atom book, sequence size )

    Category: wxNotebook

    Sequence is divided into X and Y amounts. X is the amount to add to to the wideness of the wxNotebook's tab's and Y is the amount that the text on the tabs will move down. If the values are negative, then X will subtract from the wideness of the tabs, and Y will make the text move up.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_page_image , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    set_page_image
    ( atom book, integer page, atom image )

    Category: wxNotebook

    This sets the selected page to have the selected image, so long as an imagelist has been set.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_selection , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    set_page_selection
    ( atom book, integer page )

    Category: wxNotebook

    This sets the wxNotebook to show the specified page. The index is 0 based, so the first page will be 0, instead of 1.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_text, set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    set_page_text
    ( atom book, integer page, sequence text )

    Category: wxNotebook

    Sets the text of the wxNotebook's tab for that page to text. The first page is 0, not 1.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_tab_size , show_page


    wxNotebook
    Table of Contents

    [proc]
    set_tab_size
    ( atom book, sequence size )

    Category: wxNotebook

    This works much like set_padding. However instead of increasing or decreasing the size, the tabs are set to have the width specified by the first value in size, and the length of the second value in size. However, unlike set_padding, a negative value is not to be used.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, show_page


    wxNotebook
    Table of Contents

    [proc]
    show_page
    ( atom book, integer page )

    Category: wxNotebook

    Sets the wxNotebook to show a page specified by integer page. The first page is 1 instead of being 0.

    See Also: add_page, delete_all_pages , get_next_page , get_page_count , get_page_image , insert_page , notebook_imagelist, remove_page , set_padding , set_page_image , set_page_selection , set_page_text, set_tab_size